import org.hyperic.hq.hqu.rendit.HQUPlugin

class Plugin extends HQUPlugin {
	void initialize(File pluginDir) {
		super.initialize(pluginDir)
		/**
		 * The following can be un-commented to have the plugin's view rendered in HQ.
		 *
		 * description:  The brief name of the view (e.g.: "Fast Executor")
		 * attachType:   one of ['masthead', 'admin', 'resource']
		 * controller:   The controller to invoke when the view is to be generated
		 * action:       The method within 'controller' to invoke
		 * category:     (optional)  If set, specifies either 'tracker' or 'resource' menu
		 * resourceType: (if attachType == resource), specifies an list of 
		 *               type names to attach to (ex. ['MacOSX', 'Linux'])
		 */
		
		addView(description:  'A Groovy HQU-cool',
				attachType:   'masthead',
				controller:   NeuroController,
				action:       'demo',
				category:	  'tracker')
	}
	
	
	/*
	 addView(description:  'A Groovy HQU-cool',
	 attachType:   'masthead', 
	 controller:   FreezerController,
	 action:       'index', 
	 category:     'tracker')
	 */
	
	//	private boolean attachmentIsShown(Attachment a, Resource r, AuthzSubject u){
	//		// We are currently only functional for groups that contain at least
	//		// 1 platform
	//		if (r.isGroup()) {
	//			return r.getGroupMembers(u).find { m -> m.entityId.isPlatform() } != null
	//		}
	//		true
	//	}
	//	
	//	void initialize(File pluginDir) {
	//		super.initialize(pluginDir)
	//		addView(description:  'A Groovy HQU-cool',
	//				attachType:   'resource',
	//				toRoot:       false,
	//				platforms:    'all',
	//				byPlugin:     'tomcat',
	//				controller:   FreezerController,
	//				action:       'index')        
	//	}
	
}


